home *** CD-ROM | disk | FTP | other *** search
- Path: News.CP.Duluth.MN.US!news
- From: Yan Saillard <kannun@cp.duluth.mn.us>
- Newsgroups: comp.lang.c++
- Subject: Need help making C program, C++
- Date: Wed, 06 Mar 1996 23:57:55 -0600
- Organization: ComputerPro Internet, Duluth, MN (218)722-4245
- Message-ID: <313E7AE3.6F9C@cp.duluth.mn.us>
- NNTP-Posting-Host: pm29.cp.duluth.mn.us
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- I'm writing a calculator program for a class assignment and its already
- done in C and I wanted to "convert it" to C++. Any help would be
- appreciated!
-
- Here's the messages I got after compiling it (turbo c++ 3.1) with the
- lines below.
-
- *Warning CALK.CPP 19: Style of function definition is now obsolete
- int doOp(o,r) char o; int r;
-
- *Warning CALK.CPP 30: Style of function definition is now obsolete:
- void showResult(r) int r;
-
- What would be the way C++ defines functions?
-
- *Error CALK.CPP 39: Function 'getchar' should have a prototype
- while((op = getchar()) != 'q')
-
- this program ran fine in C.
-
- Thanks!
- --
- ___________________________________________________________________
- ____ __. _____ _______ _______ ____ ___ _______
- | |/ | / _ \ \ \ \ \ | | \ \ \
- | < / /_\ \ / | \ / | \ | | / / | \
- | | \ / | \/ | \/ | \| | / / | \
- |____|__ \\____|__ /\____|__ /\____|__ /|______/ \____|__ /
- \/ \/ \/ \/@cp.duluth.mn.us \/
- ___________________________________________________________________
-